package com.ecoolex.hotel.saas.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.lang.NonNull;

public class PresaleCouponOrderDetailExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected Integer offset;

    protected Integer rows;

    public PresaleCouponOrderDetailExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public PresaleCouponOrderDetailExample orderBy(String orderByClause) {
        this.setOrderByClause(orderByClause);
        return this;
    }

    public PresaleCouponOrderDetailExample orderBy(String ... orderByClauses) {
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < orderByClauses.length; i++) {
            sb.append(orderByClauses[i]);
            if (i < orderByClauses.length - 1) {
                sb.append(" , ");
            }
        }
        this.setOrderByClause(sb.toString());
        return this;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria(this);
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
        rows = null;
        offset = null;
    }

    public static Criteria newAndCreateCriteria() {
        PresaleCouponOrderDetailExample example = new PresaleCouponOrderDetailExample();
        return example.createCriteria();
    }

    public PresaleCouponOrderDetailExample when(boolean condition, IExampleWhen then) {
        if (condition) {
            then.example(this);
        }
        return this;
    }

    public PresaleCouponOrderDetailExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
        if (condition) {
            then.example(this);
        } else {
            otherwise.example(this);
        }
        return this;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return this.offset;
    }

    public void setRows(Integer rows) {
        this.rows = rows;
    }

    public Integer getRows() {
        return this.rows;
    }

    public PresaleCouponOrderDetailExample limit(Integer rows) {
        this.rows = rows;
        return this;
    }

    public PresaleCouponOrderDetailExample limit(Integer offset, Integer rows) {
        this.offset = offset;
        this.rows = rows;
        return this;
    }

    public PresaleCouponOrderDetailExample page(Integer page, Integer pageSize) {
        this.offset = page * pageSize;
        this.rows = pageSize;
        return this;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andDetailIdIsNull() {
            addCriterion("presalecouponorderdetail.DetailId is null");
            return (Criteria) this;
        }

        public Criteria andDetailIdIsNotNull() {
            addCriterion("presalecouponorderdetail.DetailId is not null");
            return (Criteria) this;
        }

        public Criteria andDetailIdEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.DetailId =", value, "detailId");
            return (Criteria) this;
        }

        public Criteria andDetailIdEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.DetailId = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDetailIdNotEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.DetailId <>", value, "detailId");
            return (Criteria) this;
        }

        public Criteria andDetailIdNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.DetailId <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDetailIdGreaterThan(Integer value) {
            addCriterion("presalecouponorderdetail.DetailId >", value, "detailId");
            return (Criteria) this;
        }

        public Criteria andDetailIdGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.DetailId > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDetailIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.DetailId >=", value, "detailId");
            return (Criteria) this;
        }

        public Criteria andDetailIdGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.DetailId >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDetailIdLessThan(Integer value) {
            addCriterion("presalecouponorderdetail.DetailId <", value, "detailId");
            return (Criteria) this;
        }

        public Criteria andDetailIdLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.DetailId < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDetailIdLessThanOrEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.DetailId <=", value, "detailId");
            return (Criteria) this;
        }

        public Criteria andDetailIdLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.DetailId <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDetailIdIn(List<Integer> values) {
            addCriterion("presalecouponorderdetail.DetailId in", values, "detailId");
            return (Criteria) this;
        }

        public Criteria andDetailIdNotIn(List<Integer> values) {
            addCriterion("presalecouponorderdetail.DetailId not in", values, "detailId");
            return (Criteria) this;
        }

        public Criteria andDetailIdBetween(Integer value1, Integer value2) {
            addCriterion("presalecouponorderdetail.DetailId between", value1, value2, "detailId");
            return (Criteria) this;
        }

        public Criteria andDetailIdNotBetween(Integer value1, Integer value2) {
            addCriterion("presalecouponorderdetail.DetailId not between", value1, value2, "detailId");
            return (Criteria) this;
        }

        public Criteria andOrderIdIsNull() {
            addCriterion("presalecouponorderdetail.OrderId is null");
            return (Criteria) this;
        }

        public Criteria andOrderIdIsNotNull() {
            addCriterion("presalecouponorderdetail.OrderId is not null");
            return (Criteria) this;
        }

        public Criteria andOrderIdEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.OrderId =", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.OrderId = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andOrderIdNotEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.OrderId <>", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.OrderId <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andOrderIdGreaterThan(Integer value) {
            addCriterion("presalecouponorderdetail.OrderId >", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.OrderId > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andOrderIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.OrderId >=", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.OrderId >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andOrderIdLessThan(Integer value) {
            addCriterion("presalecouponorderdetail.OrderId <", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.OrderId < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andOrderIdLessThanOrEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.OrderId <=", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.OrderId <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andOrderIdIn(List<Integer> values) {
            addCriterion("presalecouponorderdetail.OrderId in", values, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdNotIn(List<Integer> values) {
            addCriterion("presalecouponorderdetail.OrderId not in", values, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdBetween(Integer value1, Integer value2) {
            addCriterion("presalecouponorderdetail.OrderId between", value1, value2, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdNotBetween(Integer value1, Integer value2) {
            addCriterion("presalecouponorderdetail.OrderId not between", value1, value2, "orderId");
            return (Criteria) this;
        }

        public Criteria andPreCouponIdIsNull() {
            addCriterion("presalecouponorderdetail.PreCouponId is null");
            return (Criteria) this;
        }

        public Criteria andPreCouponIdIsNotNull() {
            addCriterion("presalecouponorderdetail.PreCouponId is not null");
            return (Criteria) this;
        }

        public Criteria andPreCouponIdEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.PreCouponId =", value, "preCouponId");
            return (Criteria) this;
        }

        public Criteria andPreCouponIdEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.PreCouponId = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPreCouponIdNotEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.PreCouponId <>", value, "preCouponId");
            return (Criteria) this;
        }

        public Criteria andPreCouponIdNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.PreCouponId <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPreCouponIdGreaterThan(Integer value) {
            addCriterion("presalecouponorderdetail.PreCouponId >", value, "preCouponId");
            return (Criteria) this;
        }

        public Criteria andPreCouponIdGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.PreCouponId > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPreCouponIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.PreCouponId >=", value, "preCouponId");
            return (Criteria) this;
        }

        public Criteria andPreCouponIdGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.PreCouponId >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPreCouponIdLessThan(Integer value) {
            addCriterion("presalecouponorderdetail.PreCouponId <", value, "preCouponId");
            return (Criteria) this;
        }

        public Criteria andPreCouponIdLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.PreCouponId < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPreCouponIdLessThanOrEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.PreCouponId <=", value, "preCouponId");
            return (Criteria) this;
        }

        public Criteria andPreCouponIdLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.PreCouponId <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPreCouponIdIn(List<Integer> values) {
            addCriterion("presalecouponorderdetail.PreCouponId in", values, "preCouponId");
            return (Criteria) this;
        }

        public Criteria andPreCouponIdNotIn(List<Integer> values) {
            addCriterion("presalecouponorderdetail.PreCouponId not in", values, "preCouponId");
            return (Criteria) this;
        }

        public Criteria andPreCouponIdBetween(Integer value1, Integer value2) {
            addCriterion("presalecouponorderdetail.PreCouponId between", value1, value2, "preCouponId");
            return (Criteria) this;
        }

        public Criteria andPreCouponIdNotBetween(Integer value1, Integer value2) {
            addCriterion("presalecouponorderdetail.PreCouponId not between", value1, value2, "preCouponId");
            return (Criteria) this;
        }

        public Criteria andNameIsNull() {
            addCriterion("presalecouponorderdetail.`Name` is null");
            return (Criteria) this;
        }

        public Criteria andNameIsNotNull() {
            addCriterion("presalecouponorderdetail.`Name` is not null");
            return (Criteria) this;
        }

        public Criteria andNameEqualTo(String value) {
            addCriterion("presalecouponorderdetail.`Name` =", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`Name` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNameNotEqualTo(String value) {
            addCriterion("presalecouponorderdetail.`Name` <>", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`Name` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNameGreaterThan(String value) {
            addCriterion("presalecouponorderdetail.`Name` >", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`Name` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNameGreaterThanOrEqualTo(String value) {
            addCriterion("presalecouponorderdetail.`Name` >=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`Name` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNameLessThan(String value) {
            addCriterion("presalecouponorderdetail.`Name` <", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`Name` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNameLessThanOrEqualTo(String value) {
            addCriterion("presalecouponorderdetail.`Name` <=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`Name` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andNameLike(String value) {
            addCriterion("presalecouponorderdetail.`Name` like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotLike(String value) {
            addCriterion("presalecouponorderdetail.`Name` not like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameIn(List<String> values) {
            addCriterion("presalecouponorderdetail.`Name` in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotIn(List<String> values) {
            addCriterion("presalecouponorderdetail.`Name` not in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameBetween(String value1, String value2) {
            addCriterion("presalecouponorderdetail.`Name` between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotBetween(String value1, String value2) {
            addCriterion("presalecouponorderdetail.`Name` not between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andCoverImageIsNull() {
            addCriterion("presalecouponorderdetail.CoverImage is null");
            return (Criteria) this;
        }

        public Criteria andCoverImageIsNotNull() {
            addCriterion("presalecouponorderdetail.CoverImage is not null");
            return (Criteria) this;
        }

        public Criteria andCoverImageEqualTo(String value) {
            addCriterion("presalecouponorderdetail.CoverImage =", value, "coverImage");
            return (Criteria) this;
        }

        public Criteria andCoverImageEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CoverImage = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCoverImageNotEqualTo(String value) {
            addCriterion("presalecouponorderdetail.CoverImage <>", value, "coverImage");
            return (Criteria) this;
        }

        public Criteria andCoverImageNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CoverImage <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCoverImageGreaterThan(String value) {
            addCriterion("presalecouponorderdetail.CoverImage >", value, "coverImage");
            return (Criteria) this;
        }

        public Criteria andCoverImageGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CoverImage > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCoverImageGreaterThanOrEqualTo(String value) {
            addCriterion("presalecouponorderdetail.CoverImage >=", value, "coverImage");
            return (Criteria) this;
        }

        public Criteria andCoverImageGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CoverImage >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCoverImageLessThan(String value) {
            addCriterion("presalecouponorderdetail.CoverImage <", value, "coverImage");
            return (Criteria) this;
        }

        public Criteria andCoverImageLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CoverImage < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCoverImageLessThanOrEqualTo(String value) {
            addCriterion("presalecouponorderdetail.CoverImage <=", value, "coverImage");
            return (Criteria) this;
        }

        public Criteria andCoverImageLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CoverImage <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCoverImageLike(String value) {
            addCriterion("presalecouponorderdetail.CoverImage like", value, "coverImage");
            return (Criteria) this;
        }

        public Criteria andCoverImageNotLike(String value) {
            addCriterion("presalecouponorderdetail.CoverImage not like", value, "coverImage");
            return (Criteria) this;
        }

        public Criteria andCoverImageIn(List<String> values) {
            addCriterion("presalecouponorderdetail.CoverImage in", values, "coverImage");
            return (Criteria) this;
        }

        public Criteria andCoverImageNotIn(List<String> values) {
            addCriterion("presalecouponorderdetail.CoverImage not in", values, "coverImage");
            return (Criteria) this;
        }

        public Criteria andCoverImageBetween(String value1, String value2) {
            addCriterion("presalecouponorderdetail.CoverImage between", value1, value2, "coverImage");
            return (Criteria) this;
        }

        public Criteria andCoverImageNotBetween(String value1, String value2) {
            addCriterion("presalecouponorderdetail.CoverImage not between", value1, value2, "coverImage");
            return (Criteria) this;
        }

        public Criteria andRetailPriceIsNull() {
            addCriterion("presalecouponorderdetail.RetailPrice is null");
            return (Criteria) this;
        }

        public Criteria andRetailPriceIsNotNull() {
            addCriterion("presalecouponorderdetail.RetailPrice is not null");
            return (Criteria) this;
        }

        public Criteria andRetailPriceEqualTo(BigDecimal value) {
            addCriterion("presalecouponorderdetail.RetailPrice =", value, "retailPrice");
            return (Criteria) this;
        }

        public Criteria andRetailPriceEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.RetailPrice = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andRetailPriceNotEqualTo(BigDecimal value) {
            addCriterion("presalecouponorderdetail.RetailPrice <>", value, "retailPrice");
            return (Criteria) this;
        }

        public Criteria andRetailPriceNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.RetailPrice <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andRetailPriceGreaterThan(BigDecimal value) {
            addCriterion("presalecouponorderdetail.RetailPrice >", value, "retailPrice");
            return (Criteria) this;
        }

        public Criteria andRetailPriceGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.RetailPrice > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andRetailPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("presalecouponorderdetail.RetailPrice >=", value, "retailPrice");
            return (Criteria) this;
        }

        public Criteria andRetailPriceGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.RetailPrice >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andRetailPriceLessThan(BigDecimal value) {
            addCriterion("presalecouponorderdetail.RetailPrice <", value, "retailPrice");
            return (Criteria) this;
        }

        public Criteria andRetailPriceLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.RetailPrice < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andRetailPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("presalecouponorderdetail.RetailPrice <=", value, "retailPrice");
            return (Criteria) this;
        }

        public Criteria andRetailPriceLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.RetailPrice <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andRetailPriceIn(List<BigDecimal> values) {
            addCriterion("presalecouponorderdetail.RetailPrice in", values, "retailPrice");
            return (Criteria) this;
        }

        public Criteria andRetailPriceNotIn(List<BigDecimal> values) {
            addCriterion("presalecouponorderdetail.RetailPrice not in", values, "retailPrice");
            return (Criteria) this;
        }

        public Criteria andRetailPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("presalecouponorderdetail.RetailPrice between", value1, value2, "retailPrice");
            return (Criteria) this;
        }

        public Criteria andRetailPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("presalecouponorderdetail.RetailPrice not between", value1, value2, "retailPrice");
            return (Criteria) this;
        }

        public Criteria andTotalPriceIsNull() {
            addCriterion("presalecouponorderdetail.TotalPrice is null");
            return (Criteria) this;
        }

        public Criteria andTotalPriceIsNotNull() {
            addCriterion("presalecouponorderdetail.TotalPrice is not null");
            return (Criteria) this;
        }

        public Criteria andTotalPriceEqualTo(BigDecimal value) {
            addCriterion("presalecouponorderdetail.TotalPrice =", value, "totalPrice");
            return (Criteria) this;
        }

        public Criteria andTotalPriceEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.TotalPrice = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andTotalPriceNotEqualTo(BigDecimal value) {
            addCriterion("presalecouponorderdetail.TotalPrice <>", value, "totalPrice");
            return (Criteria) this;
        }

        public Criteria andTotalPriceNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.TotalPrice <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andTotalPriceGreaterThan(BigDecimal value) {
            addCriterion("presalecouponorderdetail.TotalPrice >", value, "totalPrice");
            return (Criteria) this;
        }

        public Criteria andTotalPriceGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.TotalPrice > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andTotalPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("presalecouponorderdetail.TotalPrice >=", value, "totalPrice");
            return (Criteria) this;
        }

        public Criteria andTotalPriceGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.TotalPrice >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andTotalPriceLessThan(BigDecimal value) {
            addCriterion("presalecouponorderdetail.TotalPrice <", value, "totalPrice");
            return (Criteria) this;
        }

        public Criteria andTotalPriceLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.TotalPrice < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andTotalPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("presalecouponorderdetail.TotalPrice <=", value, "totalPrice");
            return (Criteria) this;
        }

        public Criteria andTotalPriceLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.TotalPrice <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andTotalPriceIn(List<BigDecimal> values) {
            addCriterion("presalecouponorderdetail.TotalPrice in", values, "totalPrice");
            return (Criteria) this;
        }

        public Criteria andTotalPriceNotIn(List<BigDecimal> values) {
            addCriterion("presalecouponorderdetail.TotalPrice not in", values, "totalPrice");
            return (Criteria) this;
        }

        public Criteria andTotalPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("presalecouponorderdetail.TotalPrice between", value1, value2, "totalPrice");
            return (Criteria) this;
        }

        public Criteria andTotalPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("presalecouponorderdetail.TotalPrice not between", value1, value2, "totalPrice");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("presalecouponorderdetail.`Status` is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("presalecouponorderdetail.`Status` is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.`Status` =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`Status` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.`Status` <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`Status` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("presalecouponorderdetail.`Status` >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`Status` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.`Status` >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`Status` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("presalecouponorderdetail.`Status` <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`Status` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.`Status` <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`Status` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("presalecouponorderdetail.`Status` in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("presalecouponorderdetail.`Status` not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("presalecouponorderdetail.`Status` between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("presalecouponorderdetail.`Status` not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andCouponCodeIsNull() {
            addCriterion("presalecouponorderdetail.CouponCode is null");
            return (Criteria) this;
        }

        public Criteria andCouponCodeIsNotNull() {
            addCriterion("presalecouponorderdetail.CouponCode is not null");
            return (Criteria) this;
        }

        public Criteria andCouponCodeEqualTo(String value) {
            addCriterion("presalecouponorderdetail.CouponCode =", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CouponCode = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCouponCodeNotEqualTo(String value) {
            addCriterion("presalecouponorderdetail.CouponCode <>", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CouponCode <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCouponCodeGreaterThan(String value) {
            addCriterion("presalecouponorderdetail.CouponCode >", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CouponCode > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCouponCodeGreaterThanOrEqualTo(String value) {
            addCriterion("presalecouponorderdetail.CouponCode >=", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CouponCode >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCouponCodeLessThan(String value) {
            addCriterion("presalecouponorderdetail.CouponCode <", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CouponCode < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCouponCodeLessThanOrEqualTo(String value) {
            addCriterion("presalecouponorderdetail.CouponCode <=", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CouponCode <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCouponCodeLike(String value) {
            addCriterion("presalecouponorderdetail.CouponCode like", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeNotLike(String value) {
            addCriterion("presalecouponorderdetail.CouponCode not like", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeIn(List<String> values) {
            addCriterion("presalecouponorderdetail.CouponCode in", values, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeNotIn(List<String> values) {
            addCriterion("presalecouponorderdetail.CouponCode not in", values, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeBetween(String value1, String value2) {
            addCriterion("presalecouponorderdetail.CouponCode between", value1, value2, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeNotBetween(String value1, String value2) {
            addCriterion("presalecouponorderdetail.CouponCode not between", value1, value2, "couponCode");
            return (Criteria) this;
        }

        public Criteria andStartExpirydateIsNull() {
            addCriterion("presalecouponorderdetail.StartExpirydate is null");
            return (Criteria) this;
        }

        public Criteria andStartExpirydateIsNotNull() {
            addCriterion("presalecouponorderdetail.StartExpirydate is not null");
            return (Criteria) this;
        }

        public Criteria andStartExpirydateEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.StartExpirydate =", value, "startExpirydate");
            return (Criteria) this;
        }

        public Criteria andStartExpirydateEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.StartExpirydate = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStartExpirydateNotEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.StartExpirydate <>", value, "startExpirydate");
            return (Criteria) this;
        }

        public Criteria andStartExpirydateNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.StartExpirydate <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStartExpirydateGreaterThan(Date value) {
            addCriterion("presalecouponorderdetail.StartExpirydate >", value, "startExpirydate");
            return (Criteria) this;
        }

        public Criteria andStartExpirydateGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.StartExpirydate > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStartExpirydateGreaterThanOrEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.StartExpirydate >=", value, "startExpirydate");
            return (Criteria) this;
        }

        public Criteria andStartExpirydateGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.StartExpirydate >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStartExpirydateLessThan(Date value) {
            addCriterion("presalecouponorderdetail.StartExpirydate <", value, "startExpirydate");
            return (Criteria) this;
        }

        public Criteria andStartExpirydateLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.StartExpirydate < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStartExpirydateLessThanOrEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.StartExpirydate <=", value, "startExpirydate");
            return (Criteria) this;
        }

        public Criteria andStartExpirydateLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.StartExpirydate <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStartExpirydateIn(List<Date> values) {
            addCriterion("presalecouponorderdetail.StartExpirydate in", values, "startExpirydate");
            return (Criteria) this;
        }

        public Criteria andStartExpirydateNotIn(List<Date> values) {
            addCriterion("presalecouponorderdetail.StartExpirydate not in", values, "startExpirydate");
            return (Criteria) this;
        }

        public Criteria andStartExpirydateBetween(Date value1, Date value2) {
            addCriterion("presalecouponorderdetail.StartExpirydate between", value1, value2, "startExpirydate");
            return (Criteria) this;
        }

        public Criteria andStartExpirydateNotBetween(Date value1, Date value2) {
            addCriterion("presalecouponorderdetail.StartExpirydate not between", value1, value2, "startExpirydate");
            return (Criteria) this;
        }

        public Criteria andEndExpirydateIsNull() {
            addCriterion("presalecouponorderdetail.EndExpirydate is null");
            return (Criteria) this;
        }

        public Criteria andEndExpirydateIsNotNull() {
            addCriterion("presalecouponorderdetail.EndExpirydate is not null");
            return (Criteria) this;
        }

        public Criteria andEndExpirydateEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.EndExpirydate =", value, "endExpirydate");
            return (Criteria) this;
        }

        public Criteria andEndExpirydateEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.EndExpirydate = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andEndExpirydateNotEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.EndExpirydate <>", value, "endExpirydate");
            return (Criteria) this;
        }

        public Criteria andEndExpirydateNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.EndExpirydate <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andEndExpirydateGreaterThan(Date value) {
            addCriterion("presalecouponorderdetail.EndExpirydate >", value, "endExpirydate");
            return (Criteria) this;
        }

        public Criteria andEndExpirydateGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.EndExpirydate > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andEndExpirydateGreaterThanOrEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.EndExpirydate >=", value, "endExpirydate");
            return (Criteria) this;
        }

        public Criteria andEndExpirydateGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.EndExpirydate >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andEndExpirydateLessThan(Date value) {
            addCriterion("presalecouponorderdetail.EndExpirydate <", value, "endExpirydate");
            return (Criteria) this;
        }

        public Criteria andEndExpirydateLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.EndExpirydate < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andEndExpirydateLessThanOrEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.EndExpirydate <=", value, "endExpirydate");
            return (Criteria) this;
        }

        public Criteria andEndExpirydateLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.EndExpirydate <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andEndExpirydateIn(List<Date> values) {
            addCriterion("presalecouponorderdetail.EndExpirydate in", values, "endExpirydate");
            return (Criteria) this;
        }

        public Criteria andEndExpirydateNotIn(List<Date> values) {
            addCriterion("presalecouponorderdetail.EndExpirydate not in", values, "endExpirydate");
            return (Criteria) this;
        }

        public Criteria andEndExpirydateBetween(Date value1, Date value2) {
            addCriterion("presalecouponorderdetail.EndExpirydate between", value1, value2, "endExpirydate");
            return (Criteria) this;
        }

        public Criteria andEndExpirydateNotBetween(Date value1, Date value2) {
            addCriterion("presalecouponorderdetail.EndExpirydate not between", value1, value2, "endExpirydate");
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeIsNull() {
            addCriterion("presalecouponorderdetail.DistributionSettleType is null");
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeIsNotNull() {
            addCriterion("presalecouponorderdetail.DistributionSettleType is not null");
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.DistributionSettleType =", value, "distributionSettleType");
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.DistributionSettleType = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeNotEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.DistributionSettleType <>", value, "distributionSettleType");
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.DistributionSettleType <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeGreaterThan(Integer value) {
            addCriterion("presalecouponorderdetail.DistributionSettleType >", value, "distributionSettleType");
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.DistributionSettleType > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.DistributionSettleType >=", value, "distributionSettleType");
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.DistributionSettleType >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeLessThan(Integer value) {
            addCriterion("presalecouponorderdetail.DistributionSettleType <", value, "distributionSettleType");
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.DistributionSettleType < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeLessThanOrEqualTo(Integer value) {
            addCriterion("presalecouponorderdetail.DistributionSettleType <=", value, "distributionSettleType");
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.DistributionSettleType <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeIn(List<Integer> values) {
            addCriterion("presalecouponorderdetail.DistributionSettleType in", values, "distributionSettleType");
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeNotIn(List<Integer> values) {
            addCriterion("presalecouponorderdetail.DistributionSettleType not in", values, "distributionSettleType");
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeBetween(Integer value1, Integer value2) {
            addCriterion("presalecouponorderdetail.DistributionSettleType between", value1, value2, "distributionSettleType");
            return (Criteria) this;
        }

        public Criteria andDistributionSettleTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("presalecouponorderdetail.DistributionSettleType not between", value1, value2, "distributionSettleType");
            return (Criteria) this;
        }

        public Criteria andDeletedIsNull() {
            addCriterion("presalecouponorderdetail.Deleted is null");
            return (Criteria) this;
        }

        public Criteria andDeletedIsNotNull() {
            addCriterion("presalecouponorderdetail.Deleted is not null");
            return (Criteria) this;
        }

        public Criteria andDeletedEqualTo(Boolean value) {
            addCriterion("presalecouponorderdetail.Deleted =", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.Deleted = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedNotEqualTo(Boolean value) {
            addCriterion("presalecouponorderdetail.Deleted <>", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.Deleted <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThan(Boolean value) {
            addCriterion("presalecouponorderdetail.Deleted >", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.Deleted > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanOrEqualTo(Boolean value) {
            addCriterion("presalecouponorderdetail.Deleted >=", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.Deleted >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedLessThan(Boolean value) {
            addCriterion("presalecouponorderdetail.Deleted <", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.Deleted < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanOrEqualTo(Boolean value) {
            addCriterion("presalecouponorderdetail.Deleted <=", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.Deleted <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedIn(List<Boolean> values) {
            addCriterion("presalecouponorderdetail.Deleted in", values, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotIn(List<Boolean> values) {
            addCriterion("presalecouponorderdetail.Deleted not in", values, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedBetween(Boolean value1, Boolean value2) {
            addCriterion("presalecouponorderdetail.Deleted between", value1, value2, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotBetween(Boolean value1, Boolean value2) {
            addCriterion("presalecouponorderdetail.Deleted not between", value1, value2, "deleted");
            return (Criteria) this;
        }

        public Criteria andCreateUserIsNull() {
            addCriterion("presalecouponorderdetail.`CreateUser` is null");
            return (Criteria) this;
        }

        public Criteria andCreateUserIsNotNull() {
            addCriterion("presalecouponorderdetail.`CreateUser` is not null");
            return (Criteria) this;
        }

        public Criteria andCreateUserEqualTo(String value) {
            addCriterion("presalecouponorderdetail.`CreateUser` =", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`CreateUser` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserNotEqualTo(String value) {
            addCriterion("presalecouponorderdetail.`CreateUser` <>", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`CreateUser` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThan(String value) {
            addCriterion("presalecouponorderdetail.`CreateUser` >", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`CreateUser` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
            addCriterion("presalecouponorderdetail.`CreateUser` >=", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`CreateUser` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThan(String value) {
            addCriterion("presalecouponorderdetail.`CreateUser` <", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`CreateUser` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanOrEqualTo(String value) {
            addCriterion("presalecouponorderdetail.`CreateUser` <=", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.`CreateUser` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLike(String value) {
            addCriterion("presalecouponorderdetail.`CreateUser` like", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotLike(String value) {
            addCriterion("presalecouponorderdetail.`CreateUser` not like", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserIn(List<String> values) {
            addCriterion("presalecouponorderdetail.`CreateUser` in", values, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotIn(List<String> values) {
            addCriterion("presalecouponorderdetail.`CreateUser` not in", values, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserBetween(String value1, String value2) {
            addCriterion("presalecouponorderdetail.`CreateUser` between", value1, value2, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotBetween(String value1, String value2) {
            addCriterion("presalecouponorderdetail.`CreateUser` not between", value1, value2, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("presalecouponorderdetail.CreateTime is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("presalecouponorderdetail.CreateTime is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.CreateTime =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CreateTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.CreateTime <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CreateTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("presalecouponorderdetail.CreateTime >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CreateTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.CreateTime >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CreateTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("presalecouponorderdetail.CreateTime <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CreateTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.CreateTime <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.CreateTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("presalecouponorderdetail.CreateTime in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("presalecouponorderdetail.CreateTime not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("presalecouponorderdetail.CreateTime between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("presalecouponorderdetail.CreateTime not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIsNull() {
            addCriterion("presalecouponorderdetail.UpdateUser is null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIsNotNull() {
            addCriterion("presalecouponorderdetail.UpdateUser is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserEqualTo(String value) {
            addCriterion("presalecouponorderdetail.UpdateUser =", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.UpdateUser = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotEqualTo(String value) {
            addCriterion("presalecouponorderdetail.UpdateUser <>", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.UpdateUser <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThan(String value) {
            addCriterion("presalecouponorderdetail.UpdateUser >", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.UpdateUser > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanOrEqualTo(String value) {
            addCriterion("presalecouponorderdetail.UpdateUser >=", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.UpdateUser >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThan(String value) {
            addCriterion("presalecouponorderdetail.UpdateUser <", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.UpdateUser < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanOrEqualTo(String value) {
            addCriterion("presalecouponorderdetail.UpdateUser <=", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.UpdateUser <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLike(String value) {
            addCriterion("presalecouponorderdetail.UpdateUser like", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotLike(String value) {
            addCriterion("presalecouponorderdetail.UpdateUser not like", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIn(List<String> values) {
            addCriterion("presalecouponorderdetail.UpdateUser in", values, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotIn(List<String> values) {
            addCriterion("presalecouponorderdetail.UpdateUser not in", values, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserBetween(String value1, String value2) {
            addCriterion("presalecouponorderdetail.UpdateUser between", value1, value2, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotBetween(String value1, String value2) {
            addCriterion("presalecouponorderdetail.UpdateUser not between", value1, value2, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNull() {
            addCriterion("presalecouponorderdetail.UpdateTime is null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNotNull() {
            addCriterion("presalecouponorderdetail.UpdateTime is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.UpdateTime =", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.UpdateTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.UpdateTime <>", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.UpdateTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThan(Date value) {
            addCriterion("presalecouponorderdetail.UpdateTime >", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.UpdateTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.UpdateTime >=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.UpdateTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThan(Date value) {
            addCriterion("presalecouponorderdetail.UpdateTime <", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.UpdateTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterion("presalecouponorderdetail.UpdateTime <=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualToColumn(PresaleCouponOrderDetail.Column column) {
            addCriterion(new StringBuilder("presalecouponorderdetail.UpdateTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIn(List<Date> values) {
            addCriterion("presalecouponorderdetail.UpdateTime in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotIn(List<Date> values) {
            addCriterion("presalecouponorderdetail.UpdateTime not in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
            addCriterion("presalecouponorderdetail.UpdateTime between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterion("presalecouponorderdetail.UpdateTime not between", value1, value2, "updateTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        private PresaleCouponOrderDetailExample example;

        protected Criteria(PresaleCouponOrderDetailExample example) {
            super();
            this.example = example;
        }

        public PresaleCouponOrderDetailExample example() {
            return this.example;
        }

        @Deprecated
        public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
            if (ifAdd) {
                add.add(this);
            }
            return this;
        }

        public Criteria when(boolean condition, ICriteriaWhen then) {
            if (condition) {
                then.criteria(this);
            }
            return this;
        }

        public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
            if (condition) {
                then.criteria(this);
            } else {
                otherwise.criteria(this);
            }
            return this;
        }

        public Criteria andLogicalDeleted(boolean deleted) {
            return deleted ? andDeletedEqualTo(PresaleCouponOrderDetail.Deleted.IS_DELETED.value()) : andDeletedNotEqualTo(PresaleCouponOrderDetail.Deleted.IS_DELETED.value());
        }

        @Deprecated
        public interface ICriteriaAdd {
            Criteria add(Criteria add);
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }

    public interface ICriteriaWhen {
        void criteria(Criteria criteria);
    }

    public interface IExampleWhen {
        void example(com.ecoolex.hotel.saas.entity.PresaleCouponOrderDetailExample example);
    }
}